%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for queries/v4/connections.boolean"
    Bucket0("Bucket 0 (root)<br /><br />1: <br />ᐳ: 10, 11, 70, 71, 12, 20<br />2: 9, 17, 24, 29<br />ᐳ: Access[45], Access[48]<br />3: 13, 19, 26, 31<br />ᐳ: 25, 27, 28, 30, 32, 33<br />4: 34, 37<br />ᐳ: 44, 46, 47, 49, 50, 51, 52, 53"):::bucket
    Bucket1("Bucket 1 (nullableBoundary)<br />Deps: 13, 45, 34, 28, 46, 51<br /><br />ROOT Connectionᐸ9ᐳ[13]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 19, 48, 37, 33, 49, 53<br /><br />ROOT Connectionᐸ17ᐳ[19]"):::bucket
    Bucket5("Bucket 5 (listItem)<br />Deps: 45<br /><br />ROOT __Item{5}ᐸ34ᐳ[40]"):::bucket
    Bucket6("Bucket 6 (listItem)<br />Deps: 48<br /><br />ROOT __Item{6}ᐸ37ᐳ[42]"):::bucket
    Bucket7("Bucket 7 (nullableBoundary)<br />Deps: 40, 41, 59<br /><br />ROOT Edge{5}[41]"):::bucket
    Bucket8("Bucket 8 (nullableBoundary)<br />Deps: 42, 43, 61<br /><br />ROOT Edge{6}[43]"):::bucket
    Bucket9("Bucket 9 (nullableBoundary)<br />Deps: 62<br /><br />ROOT PgSelectSingle{7}ᐸcompound_keyᐳ[62]"):::bucket
    Bucket10("Bucket 10 (nullableBoundary)<br />Deps: 63<br /><br />ROOT PgSelectSingle{8}ᐸcompound_keyᐳ[63]"):::bucket
    end
    Bucket0 --> Bucket1 & Bucket2
    Bucket1 --> Bucket5
    Bucket2 --> Bucket6
    Bucket5 --> Bucket7
    Bucket6 --> Bucket8
    Bucket7 --> Bucket9
    Bucket8 --> Bucket10

    %% plan dependencies
    PgSelect17[["PgSelect[17∈0] ➊<br />ᐸcompound_key+1ᐳ<br />More deps:<br />- Constantᐸ1ᐳ[70]"]]:::plan
    Object12{{"Object[12∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Lambda20{{"Lambda[20∈0] ➊<br />ᐸparseCursorᐳ<br />More deps:<br />- Constantᐸ'WyIzNjY0MzE3ZDgwIixmYWxzZSwyLDFd'ᐳ[71]"}}:::plan
    Object12 & Lambda20 --> PgSelect17
    Connection19[["Connection[19∈0] ➊<br />ᐸ17ᐳ<br />Dependents: 4<br />More deps:<br />- Constantᐸ1ᐳ[70]"]]:::plan
    PgSelect17 & Lambda20 --> Connection19
    PgSelect29[["PgSelect[29∈0] ➊<br />ᐸcompound_key(aggregate)ᐳ<br />More deps:<br />- Constantᐸ1ᐳ[70]"]]:::plan
    Object12 & Lambda20 --> PgSelect29
    PgSelect9[["PgSelect[9∈0] ➊<br />ᐸcompound_key+1ᐳ<br />More deps:<br />- Constantᐸ1ᐳ[70]"]]:::plan
    Object12 --> PgSelect9
    Access10{{"Access[10∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access11{{"Access[11∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access10 & Access11 --> Object12
    Connection13[["Connection[13∈0] ➊<br />ᐸ9ᐳ<br />Dependents: 4<br />More deps:<br />- Constantᐸ1ᐳ[70]"]]:::plan
    PgSelect9 --> Connection13
    PgSelect24[["PgSelect[24∈0] ➊<br />ᐸcompound_key(aggregate)ᐳ<br />More deps:<br />- Constantᐸ1ᐳ[70]"]]:::plan
    Object12 --> PgSelect24
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access10
    __Value2 --> Access11
    First25{{"First[25∈0] ➊"}}:::plan
    PgSelectRows26[["PgSelectRows[26∈0] ➊"]]:::plan
    PgSelectRows26 --> First25
    PgSelect24 --> PgSelectRows26
    PgSelectSingle27{{"PgSelectSingle[27∈0] ➊<br />ᐸcompound_keyᐳ"}}:::plan
    First25 --> PgSelectSingle27
    First30{{"First[30∈0] ➊"}}:::plan
    PgSelectRows31[["PgSelectRows[31∈0] ➊"]]:::plan
    PgSelectRows31 --> First30
    PgSelect29 --> PgSelectRows31
    PgSelectSingle32{{"PgSelectSingle[32∈0] ➊<br />ᐸcompound_keyᐳ"}}:::plan
    First30 --> PgSelectSingle32
    ConnectionItems34[["ConnectionItems[34∈0] ➊<br />Dependents: 3<br />More deps:<br />- Connection[13]"]]:::plan
    ConnectionItems37[["ConnectionItems[37∈0] ➊<br />Dependents: 3<br />More deps:<br />- Connection[19]"]]:::plan
    First44{{"First[44∈0] ➊<br />More deps:<br />- ConnectionItems[34]"}}:::plan
    Access45{{"Access[45∈0] ➊<br />ᐸ9.cursorDetailsᐳ<br />Dependents: 3"}}:::plan
    PgSelect9 --> Access45
    First47{{"First[47∈0] ➊<br />More deps:<br />- ConnectionItems[37]"}}:::plan
    Access48{{"Access[48∈0] ➊<br />ᐸ17.cursorDetailsᐳ<br />Dependents: 3"}}:::plan
    PgSelect17 --> Access48
    Last50{{"Last[50∈0] ➊<br />More deps:<br />- ConnectionItems[34]"}}:::plan
    Last52{{"Last[52∈0] ➊<br />More deps:<br />- ConnectionItems[37]"}}:::plan
    PageInfo22{{"PageInfo[22∈1] ➊<br />More deps:<br />- Connection[13]"}}:::plan
    Access54{{"Access[54∈1] ➊<br />ᐸ13.hasNextPageᐳ<br />More deps:<br />- Connection[13]"}}:::plan
    Access56{{"Access[56∈1] ➊<br />ᐸ13.hasPreviousPageᐳ<br />More deps:<br />- Connection[13]"}}:::plan
    PageInfo23{{"PageInfo[23∈2] ➊<br />More deps:<br />- Connection[19]"}}:::plan
    Access55{{"Access[55∈2] ➊<br />ᐸ19.hasNextPageᐳ<br />More deps:<br />- Connection[19]"}}:::plan
    Access57{{"Access[57∈2] ➊<br />ᐸ19.hasPreviousPageᐳ<br />More deps:<br />- Connection[19]"}}:::plan
    Edge41{{"Edge[41∈5]"}}:::plan
    __Item40[/"__Item[40∈5]<br />ᐸ34ᐳ<br />More deps:<br />- ConnectionItems[34]"\]:::itemplan
    PgCursor59{{"PgCursor[59∈5]<br />More deps:<br />- Access[45]"}}:::plan
    __Item40 & PgCursor59 --> Edge41
    __Item40 --> PgCursor59
    Edge43{{"Edge[43∈6]"}}:::plan
    __Item42[/"__Item[42∈6]<br />ᐸ37ᐳ<br />More deps:<br />- ConnectionItems[37]"\]:::itemplan
    PgCursor61{{"PgCursor[61∈6]<br />More deps:<br />- Access[48]"}}:::plan
    __Item42 & PgCursor61 --> Edge43
    __Item42 --> PgCursor61
    PgSelectSingle62{{"PgSelectSingle[62∈7]<br />ᐸcompound_keyᐳ"}}:::plan
    __Item40 --> PgSelectSingle62
    PgSelectSingle63{{"PgSelectSingle[63∈8]<br />ᐸcompound_keyᐳ"}}:::plan
    __Item42 --> PgSelectSingle63
    PgClassExpression64{{"PgClassExpression[64∈9]<br />ᐸ__compound...__.”extra”ᐳ"}}:::plan
    PgSelectSingle62 --> PgClassExpression64
    PgClassExpression66{{"PgClassExpression[66∈9]<br />ᐸ__compound...rson_id_1”ᐳ"}}:::plan
    PgClassExpression64 o--o PgClassExpression66
    PgClassExpression68{{"PgClassExpression[68∈9]<br />ᐸ__compound...rson_id_2”ᐳ"}}:::plan
    PgClassExpression66 o--o PgClassExpression68
    PgClassExpression65{{"PgClassExpression[65∈10]<br />ᐸ__compound...__.”extra”ᐳ"}}:::plan
    PgSelectSingle63 --> PgClassExpression65
    PgClassExpression67{{"PgClassExpression[67∈10]<br />ᐸ__compound...rson_id_1”ᐳ"}}:::plan
    PgClassExpression65 o--o PgClassExpression67
    PgClassExpression69{{"PgClassExpression[69∈10]<br />ᐸ__compound...rson_id_2”ᐳ"}}:::plan
    PgClassExpression67 o--o PgClassExpression69

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,PgSelect9,Access10,Access11,Object12,Connection13,PgSelect17,Connection19,Lambda20,PgSelect24,First25,PgSelectRows26,PgSelectSingle27,PgSelect29,First30,PgSelectRows31,PgSelectSingle32,ConnectionItems34,ConnectionItems37,First44,Access45,First47,Access48,Last50,Last52 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PageInfo22,Access54,Access56 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,PageInfo23,Access55,Access57 bucket2
    classDef bucket5 stroke:#7fff00
    class Bucket5,__Item40,Edge41,PgCursor59 bucket5
    classDef bucket6 stroke:#ff1493
    class Bucket6,__Item42,Edge43,PgCursor61 bucket6
    classDef bucket7 stroke:#808000
    class Bucket7,PgSelectSingle62 bucket7
    classDef bucket8 stroke:#dda0dd
    class Bucket8,PgSelectSingle63 bucket8
    classDef bucket9 stroke:#ff0000
    class Bucket9,PgClassExpression64,PgClassExpression66,PgClassExpression68 bucket9
    classDef bucket10 stroke:#ffff00
    class Bucket10,PgClassExpression65,PgClassExpression67,PgClassExpression69 bucket10

